﻿<UserControl 
    x:Class="DiscoveryLogic.Analytics.Modules.Filters.NetworkEntitySelectSetting"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Height="Auto" Width="Auto" HorizontalAlignment="Stretch" 
    VerticalAlignment="Stretch" Loaded="UserControl_Loaded">
    <Border CornerRadius="10" BorderBrush="Gray" BorderThickness="2">
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
            <DockPanel Margin="5" LastChildFill="True">
                <StackPanel Orientation="Vertical">
                    <Expander Header="Remove entity type" IsExpanded="True" >
                        <StackPanel Orientation="Vertical">
                            <Label>Uncheck entity types to remove them from network:</Label>
                            <CheckBox x:Name="ckGrants" IsChecked="True" Content="Grants" Margin="5"/>
                            <CheckBox x:Name="ckOrgs" IsChecked="True" Content="Organizations" Margin="5"/>
                            <CheckBox x:Name="ckPersons" IsChecked="True" Content="Persons" Margin="5"/>
                            <CheckBox x:Name="ckPubs" IsChecked="True" Content="Publications" Margin="5"/>
                        </StackPanel>
                    </Expander>
                    <Separator/>
                    <Expander Header="Remove selected entities by attributes">
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="*"/>

                            </Grid.ColumnDefinitions>
                            <StackPanel Orientation="Vertical" Grid.Column="0">
                                <StackPanel Orientation="Horizontal" Margin="3">
                                    <Label Width="100">Entity type:</Label>
                                    <ComboBox x:Name="cboEntityType1" Width="150" Margin="3" SelectionChanged="cboEntityType1_SelectionChanged" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Margin="3">
                                    <Label Width="100">Field name:</Label>
                                    <ComboBox x:Name="cboFieldName1" Width="150" Margin="3"/>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Margin="3">
                                    <Label Width="100">Condition:</Label>
                                    <ComboBox x:Name="cboOps1" Width="45">
                                        <ComboBoxItem IsSelected="True">=</ComboBoxItem>
                                        <ComboBoxItem>&gt;</ComboBoxItem>
                                        <ComboBoxItem>&lt;</ComboBoxItem>
                                        <ComboBoxItem>&lt;&gt;</ComboBoxItem>
                                        <ComboBoxItem>in</ComboBoxItem>
                                        <ComboBoxItem>like</ComboBoxItem>
                                    </ComboBox>
                                    <TextBox x:Name="txtCondition1" Margin="3" Width="100" Foreground="Blue" FontWeight="Bold">null</TextBox>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal" Margin="3">
                                    <Button x:Name="btnAddCondition" Content="Add condition" Width="80" Margin="3" Click="btnAddCondition_Click" />
                                </StackPanel>
                            </StackPanel>
                            <DockPanel LastChildFill="True" Grid.Column="1">
                                <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right" Margin="5">
                                    <Button x:Name="btnRemoveCondition" Content="Remove condition" Click="btnRemoveCondition_Click" />
                                </StackPanel>
                                <ListBox x:Name="lbQueries" Margin="5"/>
                            </DockPanel>
                        </Grid>
                    </Expander>
                    <Expander Header="Remove edges">
                        <StackPanel Orientation="Vertical" Margin="3">
                            <StackPanel Orientation="Horizontal">
                                <CheckBox x:Name="ckGO" Content="Grant->Org" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckGPs" Content="Grant->Person" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckGPb" Content="Grant->Pub" IsChecked="True" Margin="3" Width="100"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox x:Name="ckOG" Content="Org->Grant" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckOPs" Content="Org->Person" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckOPb" Content="Org->Pub" IsChecked="True" Margin="3" Width="100"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox x:Name="ckPsG" Content="Person->Grant" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckPsO" Content="Person->Org" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckPsPb" Content="Person->Pub" IsChecked="True" Margin="3" Width="100"/>
                            </StackPanel>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox x:Name="ckPbG" Content="Pub->Grant" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckPbO" Content="Pub->Org" IsChecked="True" Margin="3" Width="100"/>
                                <CheckBox x:Name="ckPbPs" Content="Pub->Person" IsChecked="True" Margin="3" Width="100"/>
                            </StackPanel>
                        </StackPanel>
                    </Expander>
                    <StackPanel Orientation="Horizontal" Margin="5" HorizontalAlignment="Right" VerticalAlignment="Center">
                        <Button x:Name="btnCancel" Content="Cancel" Margin="5,0,5,0" Width="75" Click="btnCancel_Click" />
                        <Button x:Name="btnApply" Content="Apply" Margin="5,0,5,0" Width="75" Click="btnApply_Click" />
                    </StackPanel>
                </StackPanel>
            </DockPanel>
        </ScrollViewer>
    </Border>
</UserControl>
